package main.a_SimpleFactoryModel;

/**
 * Created by newtranx_011 on 2017/9/21.
 */
public class OperationDiv extends Operation {

    @Override
    public double getResult() throws Exception{
        double result = 0d;
        if(this.getNumB() == 0)
            throw new Exception("除数不能为0");
        result = this.getNumA() / this.getNumB();
        return result;
    }
}
